NAME=./du4
CC=mpicxx

TBB_ROOT=/opt/intel/tbb
TBB_INC=${TBB_ROOT}/include
TBB_LIB=${TBB_ROOT}/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21
CFLAGS=-I$(TBB_INC) -L$(TBB_LIB) -ltbb

all: $(NAME) 

$(NAME): main2.cpp matrix_proxy.hpp tmp_file.hpp
	$(CC) -Wall -O3 $(CFLAGS) -o $(NAME) main2.cpp

run: $(NAME)
	 echo soubor.in | mpiexec -genv I_MPI_FABRICS shm:ofa -genv I_MPI_FALLBACK_DEVICE 0 -grr 1 -n 10 $(NAME)

run_home: $(NAME)
	  echo soubor.in | mpiexec --hostfile openmpi_hosts -np 10 $(NAME)

clear: clean

clean:
	@echo Removing program file
	@rm -f $(NAME)
